

#ifndef UC_GEENT2D_H
#define UC_GEENT2D_H

#include "zgegbl.h"
#include "zgepnt2d.h"
#include "zgeintrvl.h"
#include "zgegblnew.h"
#pragma pack (push, 8)

class UcGeImpEntity3d;
class
GE_DLLEXPIMPORT
UcGeEntity2d
{
public:
    ~UcGeEntity2d();

    ZSoft::Boolean   isKindOf    (UcGe::EntityId entType) const;
    UcGe::EntityId   type        () const;

    UcGeEntity2d*    copy        () const;
    UcGeEntity2d&    operator =  (const UcGeEntity2d& entity);

    ZSoft::Boolean   operator == (const UcGeEntity2d& entity) const;
    ZSoft::Boolean   operator != (const UcGeEntity2d& entity) const;
    ZSoft::Boolean   isEqualTo   (const UcGeEntity2d& entity,
                                  const UcGeTol& tol = UcGeContext::gTol) const;

    UcGeEntity2d&    transformBy (const UcGeMatrix2d& xfm);
    UcGeEntity2d&    translateBy (const UcGeVector2d& translateVec);
    UcGeEntity2d&    rotateBy    (double angle, const UcGePoint2d& wrtPoint
                                  = UcGePoint2d::kOrigin);      
    UcGeEntity2d&    mirror      (const UcGeLine2d& line);
    UcGeEntity2d&    scaleBy     (double scaleFactor,
                                  const UcGePoint2d& wrtPoint
                                  = UcGePoint2d::kOrigin);

    ZSoft::Boolean   isOn        (const UcGePoint2d& pnt,
                                  const UcGeTol& tol = UcGeContext::gTol) const;
protected:
    friend class UcGeEntity3d;
    friend class UcGeImpEntity3d;
    UcGeImpEntity3d* mpImpEnt;
    int mDelEnt;
    UcGeEntity2d ();
    UcGeEntity2d (const UcGeEntity2d&);
    UcGeEntity2d (UcGeImpEntity3d&, int);
    UcGeEntity2d (UcGeImpEntity3d*);
    UcGeEntity2d*    newEntity2d (UcGeImpEntity3d*) const;
};

ZSOFT_FORCE_INLINE UcGeEntity2d*
UcGeEntity2d::newEntity2d (UcGeImpEntity3d *impEnt ) const
{
    return GENEWLOC( UcGeEntity2d, this) ( impEnt );
}

#pragma pack (pop)
#endif
